import pollution from './modules/pollution'
import water from './modules/water'
import warning from './modules/warning'
import air from './modules/air'
import daily from './modules/daily'
import comprehensive from './modules/comprehensive'
import knowledge from './modules/knowledge'
import management from './modules/management'
import multidata from './modules/multidata'
const frameIn = [
    pollution,
    water,
    warning,
    air,
    comprehensive,
    daily,
    knowledge,
    management,
    multidata
]

/**
 * 在主框架之外显示
 */
const frameOut = [{
        path: '/',
        redirect: { name: 'home' },
        component: () =>
            import ('@/views/home/index'),
        meta: {
            title: '引导页',
            auth: true,
            isMenu: false
        }
    },
    {
        path: '/index',
        name: 'home',
        component: () =>
            import ('@/views/home/index'),
        meta: {
            title: '引导页',
            auth: true,
            isMenu: false
        }
    },
    {
        path: '/bigscreen',
        name: 'bigScreen',
        component: () =>
            import ('@/views/home/bigScreen'),
        meta: {
            title: '综合管理平台',
            auth: true,
            isMenu: false
        }
    },
    {
        path: '/login',
        name: 'login',
        component: () =>
            import ('@/views/system/login'),
        meta: {
            title: '登录',
            auth: false,
            isMenu: false
        }
    }
]

/**
 * 错误页面
 */
const errorPage = [{
    path: '*',
    name: '404',
    component: () =>
        import ('@/views/system/error/404')
}]

// 导出需要显示菜单的
export const frameInRoutes = frameIn

// 重新组织后导出
export default [
    ...frameOut,
    ...frameIn,
    ...errorPage
]
